package Cliente;

import Interfaces.MedicSoftInterface;

import java.net.MalformedURLException;
import java.rmi.Naming;
import java.rmi.NotBoundException;
import java.rmi.RemoteException;


public class Cliente {
	static {
		
	}
	
	
	
	private static MedicSoftInterface sistema;
	public static MedicSoftInterface obtenerSistema(){
		if(sistema==null){
			try {
				sistema=(MedicSoftInterface) Naming.lookup("//localhost/Sistema");
			} catch (MalformedURLException e) {
				e.printStackTrace();
			} catch (RemoteException e) {
				e.printStackTrace();
			} catch (NotBoundException e) {
				e.printStackTrace();
			}
		}
		return sistema;
	}
}